package com.yanmaohu.yulia.bean;

import java.util.List;

/**
 * @author Bright Lee
 */
public final class CaseAbbreviation implements CaseExpression {

    private int beginIndex;
    private int endIndex;
    private boolean nullif;
    private boolean coalesce;
    private List<ValueExpression> valueExpressionList;

    public CaseAbbreviation(int beginIndex,
                            int endIndex,
                            boolean nullif,
                            boolean coalesce,
                            List<ValueExpression> valueExpressionList) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
        this.nullif = nullif;
        this.coalesce = coalesce;
        this.valueExpressionList = valueExpressionList;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public boolean isNullif() {
        return nullif;
    }

    public boolean isCoalesce() {
        return coalesce;
    }

    public List<ValueExpression> getValueExpressionList() {
        return valueExpressionList;
    }

}
